<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<form class="form-horizontal" role="form" name="roleForm" id="roleForm">
  <div class="form-group">
    <label for="name" class="col-sm-2 control-label">项目名</label>
    <div class="col-sm-10">
      <input type="text" autofocus="autofocus" class="form-control" check="string" maxlength="40" name="role.name"  id="name" placeholder="填写项目名">
    </div>
  </div>
   <div class="form-group">
    <label for="age" class="col-sm-2 control-label">系统路径</label>
    <div class="col-sm-10">
      <input type="text" autofocus="autofocus" class="form-control"    name="role.systemPath"  id="age" placeholder="填写系统路径">
    </div>
  </div>
     <div class="form-group">
    <label for="age" class="col-sm-2 control-label">项目路径</label>
    <div class="col-sm-10">
      <input type="text" autofocus="autofocus" class="form-control"   name="role.path"  id="age" placeholder="填写项目路径">
    </div>
  </div>
     <div class="form-group">
    <label for="age" class="col-sm-2 control-label">备注</label>
    <div class="col-sm-10">
      <input type="text" autofocus="autofocus" class="form-control"   name="role.remark"  id="age" placeholder="填写备注">
    </div>
  </div>
</form>
<script type="text/javascript">
	//提交本表单
	function submitForm(callback){
		waittingform("roleForm","正在提交数据，请稍后...");
        var pass=checkInput($("#roleForm"));
        if(!pass){
        	closeWaittingForm("roleForm");
        }else{
        	$.ajax({
    			url:"role/add",
    			type:"POST",
    			data:$("#roleForm").serialize(),
    			dataType:"json",
    			success:function(result){
    				if(callback){
    					callback(result);
    				}
    			}
    		});
        }
	}
</script>
